package main

import (
	"fmt"
	"learngin/config"
	"learngin/model"
	"learngin/router"
)

func main() {

	defer model.DB.Close()
	initRouter := router.InitRouter()
	fmt.Println(config.Cfg.AppHost)
	model.DB.LogMode(true) //打印sql语句
	_ = initRouter.Run(config.Cfg.AppHost + ":" + config.Cfg.AppPort)
}
